-
Notifications
You must be signed in to change notification settings - Fork 11
Add Schema Registry to Provide Table Metadata #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #263 +/- ##
============================================
+ Coverage 80.26% 80.47% +0.21%
- Complexity 1337 1381 +44
============================================
Files 231 234 +3
Lines 6080 6177 +97
Branches 545 551 +6
============================================
+ Hits 4880 4971 +91
- Misses 826 831 +5
- Partials 374 375 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| DocStoreMetricProvider getDocStoreMetricProvider(); | ||
|
|
||
| default <T extends ColumnMetadata> SchemaRegistry<T> getSchemaRegistry() { | ||
| return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer Optional instead of nulls. That way, we could avoid errors/bugs where the clients forget NULL handling. By returning Optional, we are forcing the clients to do something with the null.
| connectionConfig.credentials(), | ||
| connectionConfig.applicationName(), | ||
| connectionConfig.connectionPoolConfig(), | ||
| connectionConfig.schemaCacheExpiry(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change might not be really needed (since all the services have moved to the new way of configuring).
Description
This PR introduces a way to get table schema information using the
SchemaRegistryinterface. This interface provides methods to retrieve a table's metadata from the underlying DB. For PG, this is the query that is used:Cache Refresh and Expiry
This registry fetches and caches column metadata from PostgreSQL's
information_schemaon demand. It provides:Testing
[x] Added UTs.
[x] Added integration tests.
Checklist: